Skip to content

Conversation

@heath-freenome
Copy link
Member

Reasons for making this change

Fixed #3609 by doing the magic necessary to get the SelectWidget to work in the playground

  • Updated @rjsf/antd to add a static getPopupContainerCallback to the SelectWidget component
    • Also, added the explicit open state to the Select in conjunction with providing the setOpen as the onOpenChange prop
  • Updated Playground to fix the message logged for the onBlur
  • Updated DemoFrame to fix the playground for antd select widgets as follows:
    • Override antd's SelectWidget.getPopupContainerCallback callback function to return undefined
    • Added a AntdSelectPatcher component that observes the creation of antd select dropdowns and makes sure they open in the correct location
    • Update the antd theme wrapper to render the AntdSelectPatcher, AntdStyleProvider and ConfigProvider with it's own getPopupContainer() function inside of a FrameContextConsumer

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

…yground

Fixed rjsf-team#3609 by doing the magic necessary to get the `SelectWidget` to work in the playground
- Updated `@rjsf/antd` to add a static `getPopupContainerCallback` to the `SelectWidget` component
  - Also, added the explicit `open` state to the `Select` in conjunction with providing the `setOpen` as the `onOpenChange` prop
- Updated `Playground` to fix the message logged for the `onBlur`
- Updated `DemoFrame` to fix the playground for `antd` select widgets as follows:
  - Override `antd`'s `SelectWidget.getPopupContainerCallback` callback function to return undefined
  - Added a `AntdSelectPatcher` component that observes the creation of `antd` select dropdowns and makes sure they open in the correct location
  - Update the `antd` theme wrapper to render the `AntdSelectPatcher`, `AntdStyleProvider` and `ConfigProvider` with it's own `getPopupContainer()` function inside of a `FrameContextConsumer`
@nickgros nickgros merged commit bf87ee9 into rjsf-team:main Nov 19, 2025
5 checks passed
@heath-freenome heath-freenome deleted the fix-3609 branch November 19, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Select widget broken for AntD theme in playground

2 participants